package com.bbt.dormassistant.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

public class Record implements Serializable {

    private Integer recordId;


    private Integer roomId;


    @JsonFormat(pattern = "yyyy-mm-dd")
    private Date time;

    @JsonFormat(pattern = "hh:mm:ss")
    private Date begin;


    @JsonFormat(pattern = "hh:mm:ss")
    private Date end;


    private String userId;


    private String reason;


    private Byte isApply;

    private static final long serialVersionUID = 1L;

    public Integer getRecordId() {
        return recordId;
    }


    public void setRecordId(Integer recordId) {
        this.recordId = recordId;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Date getBegin() {
        return begin;
    }

    public void setBegin(Date begin) {
        this.begin = begin;
    }

    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason == null ? null : reason.trim();
    }

    public Byte getIsApply() {
        return isApply;
    }

    public void setIsApply(Byte isApply) {
        this.isApply = isApply;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", recordId=").append(recordId);
        sb.append(", roomId=").append(roomId);
        sb.append(", time=").append(time);
        sb.append(", begin=").append(begin);
        sb.append(", end=").append(end);
        sb.append(", userId=").append(userId);
        sb.append(", reason=").append(reason);
        sb.append(", isApply=").append(isApply);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}